﻿/***************************************************
 * File name: Category.cs 
 * Author: Team A
 * Change Log: Please see SVN repository: http://test-project-drew1.googlecode.com/svn/trunk/
 * Date: December 2013
 * Description: See <summary> tab below
 * *************************************************/

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;

namespace WSCeCommerce.Domain
{

    /// <summary>
    /// Logical grouping of items example: CD, Books, etc.
    /// </summary>
    public class Category
    {

        /// <summary>
        /// Default contructor
        /// </summary>
        public Category()
        {
            Items = new List<Item>();
        }

        /// <summary>
        /// Unique ID used for database purposes
        /// </summary>
        [Key]
        public int CategoryId { get; set; }

        /// <summary>
        /// Name of the category
        /// </summary>
        
        [Required]
        [Display(Name = "Category Name")]
        public virtual string CategoryName
        { get; set; }
       


        /// <summary>
        /// List of items that belong to this category
        /// </summary>
        public ICollection<Item> Items { get; set; }
    }
}